Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update prisma monorepo to v5.16.1 #278

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 4, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) 5.14.0 -> 5.16.1 age adoption passing confidence
@prisma/instrumentation (source) 5.14.0 -> 5.16.1 age adoption passing confidence
prisma (source) 5.14.0 -> 5.16.1 age adoption passing confidence

Release Notes

prisma/prisma (@​prisma/client)

v5.16.1

Compare Source

Today, we are issuing the 5.16.1 patch release to fix an issue in Prisma client.

Fix in Prisma Client

v5.16.0

Compare Source

🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟

Highlights
Omit model fields globally

With Prisma ORM 5.16.0 we’re more than happy to announce that we’re expanding the omitApi Preview feature to also include the ability to omit fields globally.

When the Preview feature is enabled, you’re able to define fields to omit when instantiating Prisma Client.

const prisma = new PrismaClient({
  omit: {
    user: {
      // make sure that password is never queried.
      password: true,
    },
  },
});

You’re also able to omit fields from multiple models and multiple fields from the same model

const prisma = new PrismaClient({
  omit: {
    user: { 
      // make sure that password and internalId are never queried.
      password: true,
      internalId: true,
    },
    post: {
      secretkey: true,
    },
  },
});

With both local and global omit, you now have the flexibility to completely remove sensitive fields while also tailoring individual queries. If you need the ability to generally omit a field except in a specific query, you can also overwrite a global omit locally

const prisma = new PrismaClient({
  omit: {
    user: { 
      // password is omitted globally.
      password: true,
    },
  },
});

const userWithPassword = await prisma.user.findUnique({
  omit: { password: false }, // omit now false, so password is returned
  where: { id: 1 },
});
Changes to prismaSchemaFolder

In 5.15.0 we released the prismaSchemaFolder Preview feature, allowing you to create multiple Prisma Schema files in a prisma/schema directory. We’ve gotten a lot of great feedback and are really excited with how the community has been using the feature.

To continue improving our multi-file schema support, we have a few breaking changes to the prismaSchemaFolder feature:

  • When using relative paths in Prisma Schema files with the prismaSchemaFolder feature, a path is now relative to the file it is defined in rather than relative to the prisma/schema folder. This means that if you have a generator block in /project/prisma/schema/config/generator.prisma with an output of ./foo the output will be resolved to /project/prisma/schema/config/foo rather than /project/prisma/foo. The path to a SQLite file will be resolved in the same manner.
  • We realized that during migration many people would have prisma/schema as well as prisma/schema.prisma. Our initial implementation looked for a .prisma file first and would ignore the schema folder if it exists. This is now an error.
Changes to fullTextSearch

In order to improve our full-text search implementation we have made a breaking change to the fullTextSearch Preview feature.

Previously, when the feature was enabled we updated the <Model>OrderByWithRelationInput TypeScript type with the <Model>OrderByWithRelationAndSearchRelevanceInput type. However, we have noted that there are no cases where relational ordering is needed but search relevance is not. Thus, we have decided to remove the <Model>OrderByWithRelationAndSearchRelevanceInput naming and only use the <Model>OrderByWithRelationInput naming.

Fixes and improvements
Prisma
Language tools (e.g. VS Code)
Prisma Engines
Credits

Huge thanks to @​key-moon, @​pranayat, @​yubrot, @​skyzh, @​brian-dlee, @​mydea, @​nickcarnival, @​eruditmorina, @​nzakas, @​gutyerrez, @​avallete, @​ceddy4395, @​Kayoshi-dev, @​yehonatanz for helping!

v5.15.1

Compare Source

Today, we are issuing the 5.15.1 patch release.

Fixes in Prisma Client

v5.15.0

Compare Source

Today, we are excited to share the 5.15.0 stable release 🎉

🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟

Highlights
Multi-File Prisma Schema support

Prisma ORM 5.15.0 features support for multi-file Prisma Schema in Preview.

This closes a long standing issue and does so in a clean and easy to migrate way.

To get started:

  1. Enable the prismaSchemaFolder Preview feature by including it in the previewFeatures field of your generator.
    datasource db {
      provider = "postgresql"
      url      = env("DATABASE_URL")
    }
    
    generator client {
      provider        = "prisma-client-js"
      previewFeatures = ["prismaSchemaFolder"]
    }
    
  2. Create a schema subdirectory under your prisma directory.
  3. Move your schema.prisma into this directory.

You are now set up with a multi-file Prisma Schema! Add as many or as few .prisma files to the new prisma/schema directory.

When running commands where a Prisma Schema file is expected to be provided, you can now define a Prisma Schema directory. This includes Prisma CLI commands that use the --schema option as well as defining schema via package.json

Our tooling has also been updated to handle multiple Prisma Schema files. This includes our Visual Studio Code extension and tools like database introspection, which will deposit new models in a introspected.prisma file. Existing models will be updated in the file they are found.

To learn more, please refer to our official documentation and announcement blog post. If you try out prismaSchemaFolder, please let us know!

Interesting Bug Fixes
Fix for PostgreSQL prepared statement caching for raw queries

This release fixes a nasty bug with the caching of prepared statements in raw Prisma Client queries that affected PostgreSQL when you ran the same SQL statement with differently typed paramters. This should not fail any more.

Fix for SQL Server introspection of (deprecated) CREATE DEFAULT

Our Introspection logic crashed on encountering certain multi-line CREATE DEFAULT, a deprecated way to define defaults in SQL Server. As many SQL Server users are working with established databases, this happened frequently enough that we now explicitly ignore these defaults instead of crashing.

Fix for Cloudflare D1’s lower parameter limit

Cloudflare’s D1 has a lower parameter limit than local SQLite, which caused bigger queries to fail. We adapted that limit to the D1 default for @prisma/adapter-d1, which will avoid such failures.

Fix for Cloudflare D1’s different PRAGMA support

Our generated migration SQL for SQLite did not always work for Cloudflare D1, because of differences in the supported pragmas. We adapted the SQL to work in both local SQLite and Cloudflare D1.

Fixes and improvements
Prisma Migrate
Prisma Client
Language tools (e.g. VS Code)
Credits

Huge thanks to @​pranayat, @​yubrot, and @​skyzh for helping!


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.10%. Comparing base (9d5080e) to head (19047fa).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #278      +/-   ##
===========================================
- Coverage    80.11%   80.10%   -0.02%     
===========================================
  Files          109      109              
  Lines        14854    14854              
  Branches      2361     2361              
===========================================
- Hits         11901    11899       -2     
- Misses         642      644       +2     
  Partials      2311     2311              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 485ad4f to 770ea6e Compare June 18, 2024 12:38
@renovate renovate bot changed the title fix(deps): update prisma monorepo to v5.15.0 fix(deps): update prisma monorepo Jun 18, 2024
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 770ea6e to 179aa17 Compare June 18, 2024 13:46
@renovate renovate bot changed the title fix(deps): update prisma monorepo fix(deps): update prisma monorepo to v5.15.1 Jun 18, 2024
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 179aa17 to f9ef8c6 Compare June 25, 2024 16:34
@renovate renovate bot changed the title fix(deps): update prisma monorepo to v5.15.1 fix(deps): update prisma monorepo to v5.16.0 Jun 25, 2024
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from f9ef8c6 to 19047fa Compare June 27, 2024 13:42
@renovate renovate bot changed the title fix(deps): update prisma monorepo to v5.16.0 fix(deps): update prisma monorepo to v5.16.1 Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants